﻿@{
    Layout = null;
    Sysconfig config = ViewData["config"] as Sysconfig;
    string turl = ViewBag.turl as string;
}
<!DOCTYPE html>
<!--HTML5 doctype-->
<html>
<head>
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width,initial-scale=1,user-scalable=0">
    <title>微信账号登录</title>
    <link rel="stylesheet" type="text/css" href="/mobile/css/validate.css" />
    <link rel="stylesheet" type="text/css" href="/mobile/css/style.css" />
    <script type="text/javascript" charset="utf-8" src="/mobile/js/zepto.min.js"></script>
    <script type="text/javascript" charset="utf-8" src="/mobile/js/weui.min.js"></script>
    <script type="text/javascript" charset="utf-8" src="/mobile/js/common.js"></script>
    <script type="text/javascript" charset="utf-8" src="/mobile/js/mvalidate.js"></script>
    <script type="text/javascript" charset="utf-8" src="/mobile/js/mvalidate-extend.js"></script>
    <script type="text/javascript">
        $(function () {
            //初始化TAB选项卡
            weui.tab('#tab', {
                defaultIndex: 0,
                onChange: function (index) {
                    //console.log(index);
                }
            });
            //初始化表单1
            AjaxInitForm('#bindForm', '#btnSubmit1', 0, '#turl');
            //初始化表单2
            AjaxInitForm('#oauthForm', '#btnSubmit2', 0, '#turl');
        });
    </script>
</head>

<body ontouchstart>
    <div class="page">
        <!--页面头部-->
        <div class="header">
            <a class="back" asp-area="Web" asp-controller="Register" asp-action="Index">
                <i class="iconfont icon-arrow-left"></i>
            </a>
            <h3>微信账号登录</h3>
            <div class="right">
                <a class="weui-cell_access weui-cell_link" asp-area="Web" asp-controller="Index" asp-action="Index">
                    <i class="iconfont icon-home"></i>
                </a>
            </div>
        </div>
        <!--/页面头部-->

        <div class="page__bd">
            <!--跳转的地址-->
            <input id="turl" name="turl" type="hidden" value="@turl" />

            <!--Tab选项-->
            <div id="tab" class="weui-tab">
                <div class="weui-navbar">
                    <div class="weui-navbar__item weui-bar__item_on">绑定已有的账号</div>
                    <div class="weui-navbar__item">创建新的账号</div>
                </div>

                <div class="weui-tab__panel">
                    <!--绑定已有的账号-->
                    <div class="weui-tab__content">
                        <form id="bindForm" name="bindForm" class="form-box" url="/submit_ajax/index?action=user_oauth_bind">
                            <div class="weui-panel weui-panel_access">
                                <div class="weui-panel__hd">绑定已有的账号</div>
                                <div class="weui-panel__bd">
                                    <div class="weui-cells_form">

                                        <div class="weui-cell">
                                            <div class="weui-cell__hd">
                                                <label class="weui-label">用户名</label>
                                            </div>
                                            <div class="weui-cell__bd">
                                                <input id="txtUserName" name="txtUserName" type="text" class="weui-input" placeholder="请输入用户名" data-validate="username" />
                                            </div>
                                        </div>
                                        <div class="weui-cell">
                                            <div class="weui-cell__hd">
                                                <label class="weui-label">密码</label>
                                            </div>
                                            <div class="weui-cell__bd">
                                                <input id="txtPassword" name="txtPassword" type="password" class="weui-input" placeholder="请输入密码" data-validate="password" />
                                            </div>
                                        </div>

                                    </div>
                                </div>
                            </div>

                            <div class="weui-btn-area">
                                <input id="btnSubmit1" name="btnSubmit1" type="submit" class="weui-btn weui-btn_primary" value="立即绑定" />
                            </div>
                        </form>
                    </div>
                    <!--/绑定已有的账号-->
                    <!--创建新的账号-->
                    <div class="weui-tab__content">
                        <form id="oauthForm" name="oauthForm" class="form-box" url="/submit_ajax/index?action=user_oauth_register">
                            <div class="weui-panel weui-panel_access">
                                <div class="weui-panel__hd">创建新的账号</div>
                                <div class="weui-panel__bd">
                                    <div class="weui-cells_form">

                                        <div class="weui-cell">
                                            <div class="weui-cell__hd">
                                                <label class="weui-label">电子邮箱</label>
                                            </div>
                                            <div class="weui-cell__bd">
                                                <input id="txtEmail" name="txtEmail" type="text" class="weui-input" placeholder="请输入邮箱账号" />
                                            </div>
                                        </div>
                                        <div class="weui-cell">
                                            <div class="weui-cell__hd">
                                                <label class="weui-label">手机号码</label>
                                            </div>
                                            <div class="weui-cell__bd">
                                                <input id="txtMobile" name="txtMobile" class="weui-input" type="tel" placeholder="请输入手机号" data-validate="m" />
                                            </div>
                                        </div>
                                        <div class="weui-cell">
                                            <div class="weui-cell__hd">
                                                <label class="weui-label">登录密码</label>
                                            </div>
                                            <div class="weui-cell__bd">
                                                <input id="txtPassword" name="txtPassword" type="password" class="weui-input" placeholder="请设置密码" data-validate="password" />
                                            </div>
                                        </div>

                                    </div>
                                </div>
                            </div>

                            <div class="weui-btn-area">
                                <input id="btnSubmit2" name="btnSubmit2" type="submit" class="weui-btn weui-btn_primary" value="创建新账户" />
                            </div>
                        </form>
                    </div>
                    <!--创建新的账号-->
                </div>
            </div>
            <!--/Tab选项-->

        </div>

        <div class="page__ft">
            <!--版权信息-->
            @await Html.PartialAsync("~/Areas/Web/Views/Shared/_Copyright.cshtml")
            <!--/版权信息-->
            <!--底部导航-->
            @await Html.PartialAsync("~/Areas/Web/Views/Shared/_Footer.cshtml")
            <!--/底部导航-->
        </div>

    </div>
</body>
</html>
